import Vue from 'vue';
import App from './App.vue';
import router from './router';
import store from './store';
import VueAxiosPlugin from 'vue-axios-plugin';
import vantui from './vantui';
import { Lazyload } from 'vant';
import { VueMasonryPlugin } from 'vue-masonry';
import { InfiniteLoad } from 'wot-design';
import { Input } from 'wot-design';
import VueAwesomeSwiper from 'vue-awesome-swiper';
// import style
import 'swiper/css/swiper.css';

Vue.use(VueAwesomeSwiper, /* { default options with global component } */)
Vue.use(InfiniteLoad)
Vue.use(Input)
//瀑布流
Vue.use(VueMasonryPlugin)
// 这是我们自己写的vue插件,用于循环添加 wot-design 按需引入组件
Vue.use(vantui)
Vue.use(Lazyload, {
  lazyComponent: true,
});
Vue.use(VueAxiosPlugin, {
  // 请求拦截处理
  reqHandleFunc: config => config,
  reqErrorFunc: error => Promise.reject(error),
  // 响应拦截处理
  resHandleFunc: response => response,
  resErrorFunc: error => Promise.reject(error)
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
